# -*- coding: utf-8 -*-
# Auther : 风雪
# Date : 2023/12/8 21:08
# File : app_falsk.py


import time
import json
from urllib.parse import quote_plus, unquote_plus,unquote

from flask import Flask, request, jsonify

from f6zhishu.app.vin_all_name import get_dict
from f6zhishu.app.f6_one import F6

app = Flask(__name__)

# data_dict = get_dict()
f6 = F6()


@app.route('/api/vin', methods=['GET'])
def get_vin():
    vin: str = request.args.get('vin')
    cookies: str = request.args.get('cookies')
    cookies_dict: dict = json.loads(cookies)

    data = f6.mian(vin=vin, cookies=cookies_dict)
    return jsonify(data)


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=8000, debug=False)
